package scaladuct.validation

import javax.validation.{ConstraintViolation, ValidationException}

/**
 * <p>
 * Created by IntelliJ IDEA.
 * User: zslajchrt
 * Date: Aug 18, 2010
 * Time: 3:33:07 PM
 */

class ConstraintViolationException(val violations: java.util.Set[ConstraintViolation[AnyRef]])
        extends ValidationException(violations.toString) {

  val violationSet: Set[ConstraintViolation[AnyRef]] = violations.toArray.toSet.
          asInstanceOf[Set[ConstraintViolation[AnyRef]]]

}